import { IContactInfo, IAddress, ICompany } from "@/components/Customer/index";
const ContactInfoStore = {
  namespaced: true,
  state: {
    contactInfo: null,
    address: null,
    selectedAddress: null,
    selectedCompany: null,
  },
  mutations: {
    setContactInfo: (
      state: { contactInfo: IContactInfo | null },
      contactInfo: IContactInfo | null
    ) => {
      state.contactInfo = contactInfo;
    },
    setAddress: (
      state: { address: IAddress[] | null },
      address: IAddress[] | null
    ) => {
      state.address = address;
    },
    setSelectedAddress: (
      state: { selectedAddress: IAddress | null },
      selectedAddress: IAddress | null
    ) => {
      state.selectedAddress = selectedAddress;
    },
    setSelectedCompany: (
      state: { selectedCompany: ICompany | null },
      selectedCompany: ICompany | null
    ) => {
      state.selectedCompany = selectedCompany;
    },
  },
};

export { ContactInfoStore };
